package wl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;

import wl.domain.EnterprisePojo;
import wl.mapper.EnterprisePojoMapper;
import wl.service.EnterprisePojoService;


@Service
public class EnterprisePojoServiceImpl implements EnterprisePojoService{
	
	@Autowired
	EnterprisePojoMapper enterpriseMapper;
	

	public List<EnterprisePojo> queryAll(int pageNo,int pageSize) {
		//int pageNo=1;
		//int pageSize=3;
		PageHelper.startPage(pageNo,pageSize);//实现物理分页，PageHelper.startPage(firstpage，pagesize)
		return enterpriseMapper.queryAll();
		
	}


	@Override
	public void insertEnterprisePojo(EnterprisePojo enterprisePojo) {
		// TODO Auto-generated method stub
		enterpriseMapper.insertEnterprisePojo(enterprisePojo);
		
	}


	@Override
	public void deleteEnterprisePojo(int e_id) {
		// TODO Auto-generated method stub
		enterpriseMapper.deleteEnterprisePojo(e_id);
	}


	@Override
	public void updateEnterprisePojo(EnterprisePojo enterprisePojo) {
		// TODO Auto-generated method stub
		enterpriseMapper.updateEnterprisePojo(enterprisePojo);
	}

}
